<template>
  <div class="detail-page">
    <div class="page-header">
      <div class="title-box">
        <el-button class="back-button" icon="el-icon-back" @click="goback">返回</el-button>
        <div class="page-title">详情</div>
      </div>
    </div>
    <div class="page-body">
      <div class="titleStyle">
        <span>重点人员信息</span>
      </div>
      <el-descriptions :column="2">
        <el-descriptions-item label="重点人员姓名">{{ form.name }}</el-descriptions-item>
        <el-descriptions-item label="联系方式">{{ form.contact }}</el-descriptions-item>
        <el-descriptions-item label="住址">{{ form.address }}</el-descriptions-item>
        <el-descriptions-item label="责任人">{{ form.responsiblePersonName }}</el-descriptions-item>
        <el-descriptions-item label="问题描述">{{ form.problemDescription }}</el-descriptions-item>
      </el-descriptions>
      <div class="titleStyle">
        <span>走访纪实记录</span>
      </div>
      <div
        v-for="item in tableData"
        :key="item.id"
      >
        <el-descriptions :column="2">
          <el-descriptions-item label="提交人">{{ item.authorName }}</el-descriptions-item>
          <el-descriptions-item label="提交时间">{{ item.submissionTime }}</el-descriptions-item>
          <el-descriptions-item :span="2" label="走访情况记录">{{ item.recordsVisits }}</el-descriptions-item>
          <el-descriptions-item :span="2" label="走访照片">{{}}</el-descriptions-item>
          <el-descriptions-item label="走访录音">{{}}</el-descriptions-item>
        </el-descriptions>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  data () {
    return {
      form: {},
      tableData: []
    }
  },
  methods: {
    init (row) {
      this.form = { ...row }
      this.tableData = row.massDocumentaryRecordVisitVOList
    },
    goback () {
      this.$emit('goback')
    }
    // detailToEdit () {
    //   this.$emit('detailToEdit', this.form)
    // }
  }
}
</script>
<style scoped lang="scss">
  .page-header {
    display: flex;
    height: 60px;
    align-items: center;
    border-bottom: 1px solid #ddd;
    // justify-content: space-between;
    .title-box {
      display: flex;
      height: 60px;
      align-items: center;
    }
    .back-button {
      margin-right: 16px;
    }
    .page-title {
      font-size: 18px;
      font-weight: 600;
    }
  }
  .page-body {
    height: calc(100vh - 130px);
    overflow-y: auto;
    position: relative;
    .titleStyle {
      font-weight: 600;
      height: 35px;
      line-height: 35px;
      padding-left: 10px;
      padding-right: 10px;
      margin-bottom: 8px;
      background-color: #d8eff9;
      display: flex;
      justify-content: space-between;
    }
  }
</style>
